<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var a = +prompt()
    while (a <= 1) {
        a = +prompt('请输入比1大的整数')
    }
    alert(input())
    function sushu(num) {
        for (var i = 2; i <=num; i++) {
            if (i == num) {
                return true
            }
            // if (num == 2) {
            //     return false
            // }
            else if (num % i == 0) {
                return false
            }
        }
    }
    function input(){
        if (sushu(a)){
            return '这是质数'
        }
        else {
            return '这是合数'
        }
    }
</script>
</html>